/<template>
   <div class="comment">
  <avue-crud
    :option="tableOption"
    @search-change="searchs"
    @search-reset="resetChange"
    @size-change="sizeChange"
    @current-change="currentChange"
    @selection-change="selectionch"
   
  >
    <template #menu-left="{}">
      <el-button type="primary" class="menubtns" color="#02A1E9" icon="el-icon-plus"
        >新增</el-button
      >
    </template>
    <template>
      <el-tag size="small" type="danger"
        >待审核</el-tag
      >
      <el-tag size="small">审核通过</el-tag>
      
    </template>
    <template #pic="scope">
      <img :src="scope.row.pic" alt="" />
    </template>
    <template #menu="{}">
      <el-button type="primary" icon="el-icon-edit">编辑</el-button>

      <el-button type="danger" icon="el-icon-delete">删除</el-button>
    </template>
  </avue-crud>
  </div>
</template>
<script setup>

const tableOption = {
  border: true,
  index: false,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  menuWidth: 350,
  align: "center",
  refreshBtn: true,
  searchMenuSpan: 4,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  viewBtn: false,
  props: {
    label: "label",
    value: "value",
  },
 
  column: [
    {
      label: "序号",
      prop: "indexLabel",
      search: false,
    },
    {
      label: "商品名称",
      prop: "prodName",
      search: true,
    },
        {
      label: "用户昵称",
      prop: "types",
      search: false,
    },
    {
      label: "记录时间",
      prop: "sort",
      search: false,
    },
        {
      label: "回复时间",
      prop: "sort",
      search: false,
    },
        {
      label: "评论得分",
      prop: "sort",
      search: false,
    },
            {
      label: "是否匿名",
      prop: "sort",
      search: false,
    },
    {
      width: 130,
      label: "审核状态",
      prop: "status",
      search: true,
      slot: true,
      type: "select",
      dicData: [
        {
          label: "待审核",
          value: 0,
        },
        {
          label: "审核通过",
          value: 1,
        },
          {
          label: "审核未通过",
          value: 2,
        },
      ],
    },

  ],



};
</script>
<style scoped>
.comment{
   width: 99%;
   height: 100%;
   background: #efefef;
   margin-left: 10px;
   margin-top: 5px;
}
.menubtns{
  margin-left: 20px;

}

</style>
